package com.project.bean;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

@Data
@Document(indexName = "news")
public class NewsEntity {
    @Id  //spring data的ID
    @Field(type = FieldType.Keyword)
    private String newsId;
    @Field(type = FieldType.Keyword) //keyword不做全文搜索
    private String title;
    private String info;
    private String type;
    @Field(type = FieldType.Keyword)
    private String time;

}
